// pages/login/login.js
Page({
  data: {
    wx_avatar: '../../image/wx_avatar.png',
    canIUse: wx.canIUse('button.open-type.getUserInfo')
  },
  onLoad() {

  },
  //授权登录
  bindGetUserInfo(e) {
    let that = this;
    if (e.detail.userInfo) {
      wx.switchTab({
        url: '../home/home'
      })
    } else {
      wx.showModal({
        title: '提示',
        content: '您点击了拒绝授权，将无法进入小程序，请授权之后再进入!',
        showCancel: false,
        confirmText: '返回授权'
      })
    }
  }
})